home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 20
/
Cream of the Crop 20 (Terry Blount) (1996).iso
/
bbs
/
qb281cz2.zip
/
STRUCT.ZIP
/
BSTRUCT.280
next >
Wrap
Text File
|
1996-05-30
|
31KB
|
843 lines
'FILE MAY BE DISTRIBUTED UNMODIFIED/UNALTERED IN ORIGINAL RELEASE ARCHIVE.
'****************************************************************************
'* *
'* BSTRUCT.280 written by James Goldbloom for Matrix Technology (tm) (C) *
'* *
'* BASIC source structures for QuickBBS version 2.80 Zeta-2 converted from *
'* Turbo Pascal for free use by any party to write utilities and other *
'* software which enhances the use of the QuickBBS software. Use of this *
'* information in any other BBS program is strictly prohibited. *
'* *
'* Contact Information: denied1@blkcat.com (James Goldbloom) *
'* 1:109/611 (Fidonet network) *
'* *
'* Original Turbo Pascal structures courtesy of Matrix Technology, *
'* Copyright 1991-1996 by Matrix Technology, All Rights Reserved. *
'* *
'****************************************************************************
'Caveats and Notes to BASIC Developers, PLEASE READ:
'
'All conversions are as generic as possible, and suggested BASICS are
'compiled basics such as Power Basic, Quick Basic, Lora, or Visual Basic.
'
'Most original comments are preserved from the Turbo Pascal structures
'and are prefixed with "(*" and suffixed with "*)". Additional comments by
'James Goldbloom, to aid in understanding and utilizing the structures,
'are prefixed by "<--". ALL comments are prefixed with "'". Any instance
'of "(?)" in comments signifies undocumented or unsupported structures.
'These structures were developed for use with FUNCTIONS and CODE SNIPPETS
'included in the release archive of BSTRUCT.ZIP. Please consult the
'SAMPLEx.BAS/FUNCTION.BAS files, where "x" denotes sample number, to help
'with string conversion, data type conversion, CRC32 conversion, date
'conversion, and other exemplified ways of accessing QuickBBS data files.
'All *.BAS source files are freeware and may be unconditionally used.
'Please write James Goldbloom at any of the addresses listed above for
'corrections, addendums, requests, and/or source you are proud to share!
'See FUNCTION.BAS for conversion of strings and other data types critical
'to the structures presented in this file, BSTRUCT.280, since Turbo
'Pascal stores these data types differently than BASIC in many regards.
'----------------------- Begin Structures Now -------------------------
'[First, determine which version of your source to create: Classic/Goldbase]
%GOLDBASE=0 '<--Set this constant to 0 (False) for Classic or 1 (True)
' for Goldbase compilation/interpretation.
$IF %GOLDBASE
MaxMsgAreas=500
FileExt$=".DAT"
$ELSE
MaxMsgAreas=200
FileExt$=".BBS"
$ENDIF
MaxFileAreas&=200 '<--Use LONG integer since areas <= INFINITY possible!
MaxLanguages=30
MaxEvents=30
MaxProtocols=20
'[All sections to follow are for data records and data types]
TYPE FlagType '<--Used to store 32 flag settings - one byte stores 8 bits
' and each bit constitues each boolean flag (see below)
A_Flags as Byte '<--Bits 0 thru 7 storing Flags A1 thru A8
B_Flags as Byte '<--Bits 0 thru 7 storing Flags B1 thru B8
C_Flags as Byte '<--Bits 0 thru 7 storing Flags C1 thru C8
D_Flags as Byte '<--Bits 0 thru 7 storing Flags D1 thru D8
END TYPE
TYPE UserIdxRecord '<--(Record) {USERIDX.BBS or USERIDX.DAT}
NameCRC as Long '<--CRC32 value storing user name
AliasCRC as Long '<--CRC32 value storing user alias
END TYPE
TYPE UserRecord '<-- (Record) {USERS.BBS or USERS.DAT}
Name as String * 36
City as String * 26
ReservedZero as Byte '<--Reserved byte field, should always be 0
Language as Byte
PwdCrc as Long
PwdChangeDate as Word
ExpireDate as Word '<--Number of days since 1/1/1900
$IF %GOLDBASE
HighMsgRead as Long
$ELSE
UnusedSpace as Long '<--See HighMsgRead below for CLASSIC data type
$ENDIF
Attrib2 as Byte '<--See bit settings comment section below
ExtraSpace as Byte
DataPhone as String * 13
HomePhone as String * 13
LastTime as String * 6
LastDate as String * 9
Attrib as Byte '<--See bit settings comments section below
Flags as FlagType '<--See structure definition above
Credit as Word
Pending as Word
$IF %GOLDBASE
TimesPosted as Word
ObsoleteField as Word
$ELSE
TimesPosted as Word
HighMsgRead as Word
$ENDIF
SecLvl as Word
Times as Word
Ups as Word
Downs as Word
UpK as Word
DownK as Word
TodayK as Integer
Elapsed as Integer
LineLength as Integer
CombinedPtr as Word '(* Record number in COMBINED.BBS *)
'(* Note: 0 signifies no combined record assigned *)
AliasPtr as Word '(* Record number in ALIAS.BBS *)
'(* Note: 0 signifies no alias record assigned *)
Birthday as Long '<--Number of days since 1/1/1900
END TYPE
' Defined BIT settings for "Attrib" byte within "UserRecord":
'
' (If bit value is 0, setting is "False", otherwise setting is "True")
'
' Bit 0: Deleted <--Marked for deletion toggle
' Bit 1: Screen Clear Codes
' Bit 2: More Prompt
' Bit 3: ANSI
' Bit 4: No-Kill
' Bit 5: Ignore Download Hours
' Bit 6: ANSI Full Screen Editor
' Bit 7: Sex (0=male, 1=female)
'
' Defined BIT settings for "Attrib2" byte within "UserRecord":
'
' (If bit value is 0, setting is "False", otherwise setting is "True")
'
' Bit 0: Guest Account (No Password Needed)
' Bit 1: SSR Configured
' Bit 2: Not Defined Yet (Should be False/0)
' Bit 3: Not Defined Yet (Should be False/0)
' Bit 4: Not Defined Yet (Should be False/0)
' Bit 5: Not Defined Yet (Should be False/0)
' Bit 6: Not Defined Yet (Should be False/0)
' Bit 7: Not Defined Yet (Should be False/0)
TYPE UserActivityType '<--Used within UserRecord
Activity as Byte
'Byte values (mapped to language data/QBBS variables for USERON.BBS):
'
' 0=InMenu 9=DownloadingFile
' 1=InDoor 10=UploadingFile
' 2=InCallback 11=ViewingFileList
' 3=ReadingMessages 12=DoingFileSearch
' 4=WritingMessage 13=LoggingOn
' 5=ChattingWithSysOp 14=LoggingOff
' 6=ChattingWithUsers 15=WaitingForCall
' 7=AnsweringQuestionaire
' 8=ViewingTextFile
END TYPE
TYPE USERONrecord '<--(Record) {USERON.BBS}
UO_Name as String * 36
UO_Alias as String * 36
UO_Line as Byte
UO_Baud as Word
UO_City as String * 26
UO_DoNotDisturb as Byte '<--Boolean setting (0=False,1=True)
UO_Conference as Byte
UO_Activity as UserActivityType '<--See related comments above
UO_Language as Byte
UO_Spare as String * 8 '<--Bytes 2 thru 9 are padding nulls
END TYPE
TYPE AliasRecord '<--(Record) {ALIAS.BBS}
AR_Alias as String * 36 '<--Alias name, or display as "(None)" if nulled
'(* Note: record 0 of ALIAS.BBS is a placeholder only, and contains no
' information. *)
END TYPE
TYPE MsgToIdxRecord '<--(Record) {MSGTOIDX.BBS or MSGTOIDX.DAT}
MTIR_Name as String * 36 '<--User name to whom message is addressed,
' used during search for new mail to user.
' Points to record within other data file(s)
' such as MSGHDR.DAT/MSGHDR.BBS which store
' information about the message.
END TYPE
TY